//
//  CameraAndPhoto.h
//  seer
//
//  Created by Lin Eidan on 14-5-28.
//  Copyright (c) 2014年 haomee. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CameraAndPhoto : NSObject

+(UIImagePickerController *)getCameraPickerControllerAndIsFront:(BOOL)isFront;

+(UIImagePickerController *)getPhotoLibarayPickerController;

//缩放，减少大小
+ (UIImage *)imageByScalingToMaxSize:(UIImage *)sourceImage andMaxWidth:(float)maxWidth;

//画线
+ (void)drawALineWithFrame:(CGRect)frame andColor:(UIColor*)color inLayer:(CALayer*)parentLayer;

+(CGFloat)degreesToRadians:(CGFloat )degrees;

+(CGFloat)radiansToDegrees:(CGFloat )radians;

//全尺寸截屏
+(UIImage *)screenShotWithView:(UIView *)view andIsFullSize:(BOOL)isFullSize;

+(UIImage*)screenShot;

//图片裁剪,如果superImage是两倍图大小，然后你又想截取特定区域，subImageSize一般都为subImageRect.size,subImageRect可能都要乘以2，如果superImage不是两倍图大小，可能就不乘2.
+(UIImage *)getImageFromImage:(UIImage*) superImage subImageSize:(CGSize)subImageSize subImageRect:(CGRect)subImageRect;

//特定形状剪裁图片
//image为底图，maskImage为遮罩，maskImage的处理比较重要，要和image一样大小，想要得到的区域留透明（或者弄成黑色），其他区域全部弄成白色（只能是白色）。。。。。
+ (UIImage*)maskImage:(UIImage *)image withMask:(UIImage *)maskImage;

+ (UIImage *)createImageWithColor:(UIColor *)color;

+ (UIImage *)createImageWithColor:(UIColor *)color andSize:(CGSize )size;

@end
